/*
 *
 * WeatherLocation
 *
 * Copyright 2008-2009 Centro Andaluz de Innovación y Tecnologías de la
 * Información y las Comunicaciones (CITIC). All Rights Reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 *
 * Please contact CITIC - Edificio CITIC, C/ Marie Curie, 6 Parque
 * Tecnológico de Andalucía 29590 - Campanillas, Málaga, Spain
 * or visit www.citic.es, if you need additional information or
 * have any questions.
 */

package es.citic.puedes.weatherservice.impl.tables;

import javax.persistence.*;

import java.util.Set;

@Entity
@Table(name = "weathermanager_weatherlocation")
public class WeatherLocation {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "weatherId")
	private Integer weatherId;

	@Column(name = "location")
	private String location;

	@Column(name = "country")
	private String country;

	@OneToMany(mappedBy = "weatherlocation", cascade = CascadeType.ALL)
	private Set<WeatherUserModel> weatherusermodel;

	/**
	 * Constructor with parameters
	 * 
	 * @param location
	 *            location name
	 * @param country
	 *            country name
	 */
	public WeatherLocation(String location, String country) {
		this.location = location;
		this.country = country;
	}

	/**
	 * Empty constructor
	 */
	public WeatherLocation() {
	}

	/**
	 * Get weatherid
	 * 
	 * @return weatherid weather pk
	 */
	public Integer getWeatherid() {
		return this.weatherId;
	}

	/**
	 * Get location
	 * 
	 * @return location Location name
	 */
	public String getLocation() {
		return this.location;
	}

	/**
	 * Get country
	 * 
	 * @return country Country name
	 */
	public String getCountry() {
		return this.country;
	}

	/**
	 * get WeatherUserModel
	 * 
	 * @return weatherusermodel List of weather user model
	 */
	public Set<WeatherUserModel> getWeatherusermodel() {
		return this.weatherusermodel;
	}

	/**
	 * Set weatherid
	 * 
	 * @param weatherid
	 *            weather pk
	 */
	public void setWeatherid(Integer weatherId) {
		this.weatherId = weatherId;
	}

	/**
	 * Set location
	 * 
	 * @param location
	 *            Location name
	 */
	public void setLocation(String location) {
		this.location = location;
	}

	/**
	 * Set country
	 * 
	 * @param country
	 *            Country name
	 */
	public void setCountry(String country) {
		this.country = country;
	}

	/**
	 * Set weatherusermodel
	 * 
	 * @param weatherusermodel
	 *            List of weather user model
	 */
	public void setWeatherusermodel(Set<WeatherUserModel> weatherusermodel) {
		this.weatherusermodel = weatherusermodel;
	}
}